<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

header('Content-Type:text/html; charset=utf-8');
$host='localhost';
$user='root';
$pass='';
$dbname='bbs';

$conn=new mysqli($host,$user,$pass,$dbname);
$conn->query('set names  utf8');
/*if($conn->connect_error) {
    die("连接失败：".$conn->connect_error);
    $conn->query('set names  utf8');
}
echo '连接成功！';
*/
/*
$conn = @mysql_connect("localhost","root","ILOVECFMQH333");
if (!$conn){
    die("数据连接失败：".mysql_connect());
}
 else {
    echo "连接成功！";
}
*/